package Day2025_03_29;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Scanner;

/**
 * 12届蓝桥杯 javaB 直线
 */

class Pair {
    Double a;
    Double b;
    public Pair () {}
    public Pair (Double a, Double b) {
        this.a = a;
        this.b = b;
    }
    public Double getKey() {
        return a;
    }
    public Double getValue () {
        return b;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Pair pair = (Pair) o;
        return Objects.equals(a, pair.a) && Objects.equals(b, pair.b);
    }

    @Override
    public int hashCode() {
        return Objects.hash(a, b);
    }
}

public class Demo03 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        Map<Pair, Integer> map = new HashMap<>();
        int ret = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < 3; j++) {
                for (int k = 0; k < 2; k++) {
                    for (int l = 0; l < 3; l++) {
                        if (i == k || j == l) continue;
                        double a = (l - j) / (k - i);
                        double b = j - a * i;
                        Pair pair = new Pair(a, b);
                        if (!map.containsKey(pair)) {
                            map.put(pair, 1);
                            ret++;
                        }
                    }
                }
            }
        }
        System.out.println(ret + 2 + 3);
        scan.close();
    }
}
